//
//  SpecialCell.m
//  IntimateGift
//
//  Created by zh on 14/12/17.
//  Copyright (c) 2014年 蔡宏业. All rights reserved.
//

#import "SpecialCell.h"

@implementation SpecialCell

- (void)dealloc
{
    [_pic release];
    [_name release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
    self.pic = [[UIImageView alloc] init];
    self.name = [[UILabel alloc] init];
        self.name.textAlignment = NSTextAlignmentCenter;
        self.name.textColor = [UIColor whiteColor];
        self.name.font = [UIFont boldSystemFontOfSize:20];
    [self.pic addSubview:self.name];
    [self.contentView addSubview:self.pic];
    [_pic release];
    [_name release];
    [self layoutSubviews];
    }
    return self;
}



- (void)layoutSubviews
{
    [super layoutSubviews];
    _pic.frame = CGRectMake(5, 5, self.contentView.bounds.size.width - 10, self.contentView.bounds.size.height - 10);
    _name.frame = CGRectMake(5, self.pic.bounds.size.height - 50, self.bounds.size.width, 30);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
